<div class="modal fade" data-backdrop="static" data-bind="modal:isShow">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-bind="click:reset"><i class="fa fa-close"></i></button>
                <h4 class="modal-title">Form</h4>
            </div>
            <div class="modal-body">
                <div class="form-horizontal">
                    <div class="form-group">
                        <label class="control-label col-md-3">Submit to</label>
                        <div class="col-md-9">
                            <select class="form-control" data-bind="value:dataSourceMethodId,options:submitTargets,optionsText:'name',optionsValue:'value',optionsCaption:'--Please select--',error:dataSourceMethodId"></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="control-label col-md-3">Method</label>
                        <div class="col-md-9">
                            <div class="radio"><label><input type="radio" name="method" value="get" data-bind="checked:method">Get</label></div>
                            <div class="radio"><label><input type="radio" name="method" value="post" data-bind="checked:method">Post</label></div>
                            <div class="radio"><label><input type="radio" name="method" value="ajax-get" data-bind="checked:method">AJAX Get</label></div>
                            <div class="radio"><label><input type="radio" name="method" value="ajax-post" data-bind="checked:method">AJAX Post</label></div>
                        </div>
                    </div>
                    <!-- ko ifnot: ajax -->
                    <div class="form-group">
                        <label class="control-label col-md-3">Redirect URL</label>
                        <div class="col-md-9">
                            <select class="form-control" data-bind="value:redirect,options:pages,optionsText:'name',optionsValue:'route',optionsCaption:'--Please select--'"></select>
                        </div>
                    </div>
                    <!-- ko if: redirect() && redirectParameters().length -->
                    <div class="form-group">
                        <div class="col-md-9 col-md-offset-3">
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>Parameter</th>
                                        <th>Value</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <!--ko foreach:redirectParameters-->
                                    <tr>
                                        <td data-bind="text:name"></td>
                                        <td>
                                            <select class="form-control" data-bind="value:value, options:$parent.actionReturnFields, optionsText: 'name', optionsValue: 'value', optionsCaption: '-- Select a post result field --'">
                                                </select>
                                        </td>
                                    </tr>
                                    <!--/ko-->
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <!-- /ko -->
                    <!-- /ko -->
                    <div class="form-group" data-bind="visible: ajax">
                        <label class="control-label col-md-3">Callback</label>
                        <div class="col-md-9">
                            <textarea class="form-control" data-bind="value:callback"></textarea>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button class="btn green" data-bind="click:save">Save</button>
                <button class="btn gray" data-bind="click:reset" aria-hidden="true">Cancel</button>
            </div>
        </div>
    </div>
</div>